package com.testfileupload.uploadimg.design.prototype;

import java.util.ArrayList;
import java.util.List;

/**
 * 在内存以二进制流的方式拷贝，没有通过new关键字
 */
public class ShelldowMail implements Cloneable {
    //收件人
    private String receiver;
    //邮件名称
    private String subject;
    //称谓
    private String appellation;
    //邮件内容
    private String context;
    //尾部
    private String tail;
    private List<String> list = new ArrayList<>();

    public ShelldowMail(AVTemplate avTemplate) {
        this.context = avTemplate.getAdvContect();
        this.subject = avTemplate.getAdvSubject();
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getAppellation() {
        return appellation;
    }

    public void setAppellation(String appellation) {
        this.appellation = appellation;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getTail() {
        return tail;
    }

    public void setTail(String tail) {
        this.tail = tail;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(String s) {
        this.list.add(s);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        ShelldowMail shelldowMail = null;
        shelldowMail = (ShelldowMail) super.clone();
        return shelldowMail;
    }
}
